package net.barbierdereuille.android.AndroBib;

import android.net.Uri;
import android.provider.BaseColumns;

public final class AndroBib {
    public static final String AUTHORITY = "net.barbierdereuille.android.AndroBib";

    /**
     * Configuration table
     */
    public static final class GlobalColumn implements BaseColumns {
    	// Prevent this class from being instantiated
    	private GlobalColumn() { }
    	
    	/**
    	 * The content:// style URI for this table
    	 */
    	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/global");
    	
    	/**
    	 * The MIME type of {@link #CONTENT_URI} providing access to a single configuration element
    	 */
    	public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.barbeirdereuille.bibtex.global";

    	/**
    	 * The MIME type of {@link #CONTENT_URI} providing access to a list of configuration elements
    	 */
    	public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.barbeirdereuille.bibtex.global";
    	
    	/**
    	 * The name of the file currently opened
    	 * <P>Type: TEXT</P>
    	 */
    	public static final String FILE = "file";
    	
    	/**
    	 * Time of the last synchronization with the file (read or write)
    	 */
    	public static final String TIMESTAMP = "timestamp";
    	
    	/*
    	 * Preamble of the file
    	 */
    	//public static final String PREAMBLE = "preamble";
    }
    
    /**
     * Main BibTex table
     */
    public static final class BibTexColumn implements BaseColumns {
    	// Prevent this class from being instantiated
    	private BibTexColumn() { }
    	
    	/**
    	 * The content:// style URI for this table
    	 */
    	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/reference");
    	
    	/**
    	 * The MIME type of {@link #CONTENT_URI} providing access to a single reference 
    	 */
    	public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.barbierdereuille.bibtex.reference";
    	
    	/**
    	 * The MIME type of {@link #CONTENT_URI} providing access to a set of references 
    	 */
    	public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.barbierdereuille.bibtex.reference";
    	
    	/**
    	 * Default sorting type
    	 */
    	public static final String DEFAULT_SORT_ORDER = "key ASC";
    	
        /**
         * The id of a reference
         * <P>Type: TEXT</P>
         */
        public static final String KEY = "key";
        
        /**
         * The type of a reference
         * <P>Type: TEXT</P>
         */
        public static final String TYPE = "type";
    }
    
    /**
     * Authors table
     */
    public static final class AuthorColumn implements BaseColumns {
    	// Prevent this class from being instantiated
    	private AuthorColumn() { }

    	/**
    	 * The content:// style URI for this table
    	 */
    	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/author");
    	
    	/**
    	 * The MIME type of {@link #CONTENT_URI} providing access to a single author
    	 */
    	public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.barbierdereuille.bibtex.author";

    	/**
    	 * The MIME type of {@link #CONTENT_URI} providing access to a list of authors
    	 */
    	public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.barbierdereuille.bibtex.author";
    	
    	/**
    	 * Default sorting type
    	 */
    	public static final String DEFAULT_SORT_ORDER = "name ASC";
    	
    	/**
    	 * The name of the author
    	 * <P>Type: TEXT</P>
    	 */
    	public static final String NAME = "name";
    	
    	/**
    	 * The institution of the author
    	 * <P>Type: TEXT</P>
    	 */
    	//public static final String INSTITUTION = "institution";
    }
    
    /**
     * Fields table
     */
    public static final class FieldColumn implements BaseColumns {
    	// Prevent this class from being instantiated
    	private FieldColumn() { }
    	
    	/**
    	 * The content:// style URI for this table
    	 */
    	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/field");
    	
    	/**
    	 * The MIME type of {@link #CONTENT_URI} providing access to a single field
    	 */
    	public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.barbierdereuille.bibtex.field";

    	/**
    	 * The MIME type of {@link #CONTENT_URI} providing access to a list of fields
    	 */
    	public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.barbierdereuille.bibtex.field";
    	
    	/**
    	 * Type of a field
    	 * <P>Type: String</P>
    	 */
    	public static final String TYPE = "type";
    	
    	/**
    	 * Content of the field
    	 * <P>Type: TEXT</P>
    	 */
    	public static final String CONTENT = "content";
    	
    	/**
    	 * Id of the reference containing this field
    	 */
    	public static final String REFERENCE = "reference";
    }
    
    public static final class StringColumn implements BaseColumns {
    	// Prevent this class from being instantiated
    	private StringColumn() { }
    	
    	/**
    	 * The content:// style URI for this table
    	 */
    	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/string");
    	
    	/**
    	 * The MIME type of {@link #CONTENT_URI} providing access to a single field
    	 */
    	public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.barbierdereuille.bibtex.string";

    	/**
    	 * The MIME type of {@link #CONTENT_URI} providing access to a list of fields
    	 */
    	public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.barbierdereuille.bibtex.string";

    	/**
    	 * Default sorting type
    	 */
    	public static final String DEFAULT_SORT_ORDER = "name ASC";
    	
    	/**
    	 * Name of the string
    	 * <P>Type: String</P>
    	 */
    	public static final String NAME = "name";

    	/**
    	 * Content of the string
    	 * <P>Type: TEXT</P>
    	 */
    	public static final String CONTENT = "content";
    }

    public static final class PreambleColumn implements BaseColumns {
    	// Prevent this class from being instantiated
    	private PreambleColumn() { }
    	
    	/**
    	 * The content:// style URI for this table
    	 */
    	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/preamble");
    	
    	/**
    	 * The MIME type of {@link #CONTENT_URI} providing access to a single field
    	 */
    	public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.barbierdereuille.bibtex.preamble";

    	/**
    	 * The MIME type of {@link #CONTENT_URI} providing access to a list of fields
    	 */
    	public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.barbierdereuille.bibtex.preamble";

    	/**
    	 * Content of the preamble item
    	 * <P>Type: TEXT</P>
    	 */
    	public static final String CONTENT = "content";
    }

}